Associate ports with an ACL

Associate ports with an ACL to apply filters to port traffic.

A port can be part of two different ACLs of different types: IPv6 and non-IPv6.

Before you begin

  • The ACL exists.

Procedure

  1. Enter Global Configuration mode:

    enable

    configure terminal

  2. Associate port interfaces with a particular ACL:

    filter acl port <1-2048> {sub-port]][,...][slot/all][all]}

  3. Remove port interfaces from a particular ACL:

    no filter acl port <1-2048> {sub-port]][,...][slot/all][all]}

Variable definitions

Use the data in the following table to use the filter acl port command.

Variable

Value

<1-2048>

Specifies the ACL ID.

{slot/port[/sub-port][-slot/port[/sub-port]][,...][slot/all][all]}

Identifies the slot and port in one of the following formats:
  • a single slot and port (slot/port)

  • a range of slots and ports (slot/port-slot/port)

  • a series of slots and ports (slot/port,slot/port,slot/port)

  • all ports on the same slot (slot/all)

  • all ports on the switch (all)

If the platform supports channelization and the port is channelized, you must also specify the sub-port in the format slot/port/sub-port.